package com.example.opengl.render.triangle

import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.base.BaseActivity
import com.example.opengl.R
import com.example.opengl.databinding.ActivityOpenglColorTriangleBinding
import com.example.opengl.main.OpenGLPath

/**
 * @author: Mr.You
 * @create: 2023-07-26 14:28
 * @description: 绘制彩色三角形
 **/
@Route(path = OpenGLPath.OPENGL_RENDER_COLOR_TRIANGLE)
class OpenGLColorTriangleActivity : BaseActivity<ActivityOpenglColorTriangleBinding>() {
    override fun getLayoutId(): Int = R.layout.activity_opengl_color_triangle

    override fun initView() {
        val drawer = ColorTriangleDrawer()
        val render = TriangleRender()
        render.addDrawerRender(drawer)
        mBinding.glSurface.setEGLContextClientVersion(2)
        mBinding.glSurface.setRenderer(render)
    }

    override fun initListener() {

    }
}